.wrapper {
  width: 100%;
  height: 100vmax;
  background-color: #171f27;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column wrap;
  --target-border-color: rgb(92, 102, 112);
  --box-border-color: hsl(210deg 7.09% 50.2%);
  --box-bg-color: hsl(210deg, 15%, 20%);
  --repeat-linear: repeating-linear-gradient(45deg, rgba(184, 204, 224, 0.06) 0px, rgba(184, 204, 224, 0.06) 10px, rgba(184, 204, 224, 0) 10px, rgba(184, 204, 224, 0) 20px);
}

#controllerTitle {
  text-align: center;
  color: #FFF;
  margin: 12px;
  font-size: 15px;
  font-weight: bold;
}

#controller {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#btn {
  font-size: 12Px;
  color: #aeb0b3;
  text-align: center;
  padding: 6px 6px;
  margin: 0 4px;
  border-bottom: 2px solid #aeb0b3;
  transition: 0.4s;

  &.active {
    color: #FFF;
    border-bottom: 2px solid #f2d662;
  }
}

.container {
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  perspective: 1000px;
  perspective-origin: 100% -100%;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
}
.playground {
  width: 300px;
  margin: 50px auto 50px;
  height: 300px;
  transform-style: preserve-3d;
  transition: all 0.5s;

  &.active {
    transform: skewY(18deg);
  }
}

.target {
  width: 300px;
  height: 300px;
  padding: 2px;
  border-radius: 4px;
  color: #fff;
  box-sizing: border-box;
  position: absolute;
  transform-style: preserve-3d;
  border: 1px solid var(--target-border-color);
  transition: all 0.5s;
  display: grid;
  grid-template-columns: 60%;
  grid-template-rows: 60%;
  place-content: center;

  &.active {
    transform: translateX(-30px) scaleX(0.85) translateZ(30px);
  }
}
#over.target {
  border: 1px solid transparent;
  z-index: 2;
}
#under.target{
  background: var(--repeat-linear);
  z-index: 1;
  &.active {
    transform: translateX(30px) scaleX(0.85) translateZ(-30px);
  }
}
.box_out {
  box-sizing: border-box;
  border: 4px dashed transparent;
  border-radius: 4px;

  transition: all 0.5s;
}
.box_inner {
  box-sizing: border-box;
  background-color: var(--box-bg-color);
  border: 2px solid var(--box-border-color);
  border-radius: 4px;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.column_box {
  width: 100%;
  height: 100%;
  padding: 2px;
  border-radius: 4px;
  position: absolute;
  display: grid;
  justify-content: center;
  grid-template-columns: 60%;
  box-sizing: border-box;
  
}
.column_line {
  position: relative;
  box-sizing: border-box;
  border-right: 2px dashed var(--target-border-color);
  border-left: 2px dashed var(--target-border-color);
  transition: all 0.5s;

  &::after {
    position: absolute;
    width: 100%;
    height: 2em;
    top: calc(-2em - 4px);
    left: -2px;
    border-radius: 8px 8px 0 0;
    content: 'C1';
    border-top: 2px dashed var(--target-border-color);
    border-left: 2px dashed var(--target-border-color);
    border-right: 2px dashed var(--target-border-color);
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
.row_box {
  width: 100%;
  height: 100%;
  padding: 2px;
  border-radius: 4px;
  position: absolute;
  display: grid;
  align-content: center;
  grid-template-rows: 60%;
  box-sizing: border-box;
}
.row_line {
  position: relative;
  box-sizing: border-box;
  border-top: 2px dashed var(--target-border-color);
  border-bottom: 2px dashed var(--target-border-color);
  transition: all 0.5s;

  &::after {
    position: absolute;
    width: 2em;
    height: 100%;
    left: calc(-2em - 4px);
    top: -2px;
    border-radius: 8px 0 0 8px;
    content: 'R1';
    border-left: 2px dashed var(--target-border-color);
    border-top: 2px dashed var(--target-border-color);
    border-bottom: 2px dashed var(--target-border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}
#bg {
  background-color: #171f27;
  opacity: 0.8;
  z-index: 0;
}
.column_box:nth-child(1),
.row_box:nth-child(2) {
  z-index: 2;
}